function t_menusub_init(e){var t,n,u=document.getElementById("rec"+e);u&&(t_menusub__isBlockVisible(u)?t_menusub__lazyInit(e):(t=!1,n=function(){!t&&t_menusub__isBlockVisible(u)&&(t=!0,window.removeEventListener("orientationchange",n),t_menusub__lazyInit(e))},window.addEventListener("orientationchange",t_throttle(function(){n()},500))))}function t_menusub__lazyInit(u){var e,s,o,t,n=document.getElementById("rec"+u);n&&(e=n.querySelectorAll(".t-menusub"),t=n.querySelectorAll("a.t-menu__link-item"),s=Array.prototype.some.call(t,function(e){return e.getAttribute("data-menu-submenu-hook")}),o=window.t_menusub__isMobile?"orientationchange":"resize",Array.prototype.forEach.call(e,function(e){var t,n=e.getAttribute("data-submenu-hook");n&&(n=document.querySelectorAll(s?'a[data-menu-submenu-hook="'+n+'"]':'a[href="'+n+'"]'),Array.prototype.forEach.call(n,function(e){e.classList.add("t-menusub__target-link"),e.setAttribute("data-tooltip-menu-id",u)}),t=e.querySelector(".t-menusub__menu"),t_menusub__appendArrow(e,n),window.t_menusub__isMobile||"ontouchend"in document?(t_menusub__setUpMenuMobile(e,t,n,u),document.removeEventListener("click",t_menusub__closeFullscreenSubmenu),document.addEventListener("click",t_menusub__closeFullscreenSubmenu)):t_menusub__setUpMenuDesktop(e,t,n),t_menusub__hightlight(),t_menusub__checkAnchorLinks(u),window.addEventListener(o,function(){t&&t_menusub__hideSubmenu(t)}))}),(t=(t=n.querySelector(".t450, .t451"))||n.querySelector("[data-menu]"))&&t.hasAttribute("data-full-submenu-mob")&&(window.t_menusub__isMobile||"ontouchend"in document)&&t_menusub__createFullscreenSubmenu(n,e))}function t_menusub__closeFullscreenSubmenu(e){var t,n=e.target.closest(".t-menusub__menu--fullscreen");n&&(t=e.target.closest(".t-menusub__menu--fullscreen__nav-arrow"),e=e.target.closest(".t-menusub__link-item:not(.t794__tm-link):not(.t978__tm-link):not(.t966__tm-link)"),(t||e)&&(n.style.transform="",document.body.classList.remove("t-body_scroll-locked"),document.documentElement.classList.remove("t-body_scroll-locked"),t&&(e=n.getAttribute("data-cachedPos"))&&window.scrollTo(0,parseInt(e,10)),setTimeout(function(){t_menusub__hideSubmenu(n)},300)))}function t_menusub__setUpMenuDesktop(e,n,t){var u,s=e.getAttribute("data-submenu-margin");Array.prototype.forEach.call(t,function(t){t.addEventListener("mouseenter",function(){t_menusub__showSubmenuOnHover(t,u,n,s)}),t.addEventListener("mouseleave",function(){u=setTimeout(function(){t_menusub__hideSubmenu(n)},300)});["click","auxclick"].forEach(function(e){t.addEventListener(e,function(e){e.preventDefault()})})}),n.addEventListener("mouseenter",function(){t_menusub__showSubmenuOnHover(n,u,n,s)}),n.addEventListener("mouseleave",function(){u=setTimeout(function(){t_menusub__hideSubmenu(n)},300)}),n.addEventListener("submenu:mouseenter",function(){window.clearTimeout(u)}),n.addEventListener("submenu:mouseleave",function(){u=setTimeout(function(){t_menusub__hideSubmenu(n)},300)})}function t_menusub__setUpMenuMobile(n,u,e,s){Array.prototype.forEach.call(e,function(t){t.addEventListener("click",function(e){e.preventDefault(),980<window.innerWidth&&u&&t_menusub__hideSubmenu(u),u.classList.contains("t-menusub__menu_show")?t_menusub__hideSubmenu(u):(e=n.getAttribute("data-submenu-margin"),t_menusub__showSubmenu(t,u,e),t_menusub__showME401Submenu(t))})}),document.addEventListener("click",function(e){var t,n;e.isTrusted&&(t=e.target.closest(".t-menusub__menu"),n=e.target.closest(".t-menusub__target-link"),e.target.closest(".t794__tm-link, .t966__tm-link")||(n&&n.getAttribute("data-tooltip-menu-id")!==s&&u.classList.contains("t-menusub__menu_show")&&t_menusub__hideSubmenu(u),t||n||!u.classList.contains("t-menusub__menu_show")||t_menusub__hideSubmenu(u)))})}function t_menusub__showSubmenuOnHover(e,t,n,u){e.classList.contains("t-menusub__menu")&&!e.classList.contains("t-menusub__menu_show")||(clearTimeout(t),e.classList.contains("t-menusub__menu")&&e.classList.contains("t-menusub__menu_show")||t_menusub__showSubmenu(e,n,u))}function t_menusub__showSubmenu(e,t,n){var u=e.offsetHeight,s=e.offsetWidth,o=e&&parseInt(e.style.marginLeft)||0,i=e?window.getComputedStyle(e).getPropertyValue("margin-top"):"0",r=window.t_menusub__isMobile?document.documentElement.clientHeight:window.innerHeight,l=window.t_menusub__isMobile?document.documentElement.clientWidth:window.innerWidth,c=window.pageYOffset,n=n?parseInt(n,10)+10:0,i=e.offsetTop-parseInt(i,10)+u+n,a=t_menusub__getLeftRelativePos(e),_=e.closest(".r"),m=_?_.id.replace("rec",""):"",m=document.getElementById("nav"+m),d=m&&"fixed"===getComputedStyle(m).position,b=(t.style.display="block",t.offsetHeight),f=t.offsetWidth,b=(!d&&c+r<i+b?(i=Math.max(i-b-u-2*n,c),t.classList.remove("t-menusub__menu_bottom"),t.classList.add("t-menusub__menu_top")):(t.classList.remove("t-menusub__menu_top"),t.classList.add("t-menusub__menu_bottom")),l<=980&&(i=0),!1),u=(a+f/2<l?(a=a+(s-f)/2+o)<0&&(a=10,b=!0):(a=l-f-10,b=!0),t.style.right="",t.style.left=a+"px",t.style.top=i+"px",t.offsetHeight,t.classList.add("t-menusub__menu_show"),e.classList.add("t-menusub__target-link_active"),e.setAttribute("aria-expanded","true"),t.querySelector(".t-menusub__content")),n=(u&&(u.style.height=""),u&&(u.style.overflow=""),t.getBoundingClientRect());n.right>l&&(t.style.left="",t.style.right="0",b=!0),d&&u&&n.bottom>r&&980<l&&(c=r-n.top-40,u.style.height=c+"px",u.style.overflow="scroll"),t_menusub__updateSubmenuArrowPosition(m,t,e,b);s=(s=_.querySelector(".t450, .t451"))||_.querySelector("[data-menu]");s&&s.hasAttribute("data-full-submenu-mob")&&(window.t_menusub__isMobile||"ontouchend"in document)&&((o=t.querySelector(".t-menusub__menu--fullscreen__nav-title"))&&(o.style.fontFamily=window.getComputedStyle(e).fontFamily),t.style.transform="translateX(0)",t.setAttribute("data-cachedPos",window.pageYOffset.toString()),document.body.classList.contains("t-body_scroll-locked")||setTimeout(function(){document.body.classList.add("t-body_scroll-locked"),document.documentElement.classList.add("t-body_scroll-locked")},300))}function t_menusub__updateSubmenuArrowPosition(e,t,n,u){var s;u?(u=Math.round(n.getBoundingClientRect().left+window.pageXOffset),s=Math.round(t.getBoundingClientRect().left+window.pageXOffset),t_menusub__createArrowCustomPos(t,u-s-10+Math.round(n.offsetWidth/2))):t.classList.remove("t-menusub__menu-custompos")}function t_menusub__createFullscreenSubmenu(l,e){Array.prototype.forEach.call(e,function(e){var t,n,u,s,o,i,r=e.querySelector(".t-menusub__menu");r&&!r.querySelector(".t-menusub__menu--fullscreen__nav")&&(e=e.previousElementSibling,t=getComputedStyle(e),i=r.closest("[data-menu], .t450, .t451, .t199__mmenu"),0===(u=n=t.color).indexOf("rgb")&&(u=n.replace("rgb(","").replace(")",""),u="rgba("+(u+=", 0.25")+")"),o="#000000",(s=i?i.querySelector(".t280__menu__bg, .t282__menu__wrapper"):null)?o=getComputedStyle(s).backgroundColor:i&&(o=getComputedStyle(i).backgroundColor),r.style.backgroundColor=o,r.classList.add("t-menusub__menu--fullscreen"),r.style.height=document.documentElement.clientHeight+"px",(s=document.createElement("div")).classList.add("t-menusub__menu--fullscreen__nav"),0===n.indexOf("rgb")&&(u=n.replace("rgb(","").replace(")",""),u="rgba("+(u+=", 0.6")+")"),(i.classList.contains("t450__left")||i.classList.contains("t451m__left"))&&r.classList.add("t-menusub__menu--fullscreen-left"),s.style.borderBottom="2px solid "+u,(o=document.createElement("p")).classList.add("t-menusub__menu--fullscreen__nav-title"),o.textContent=e.textContent,o.style.color=n,o.style.fontWeight=t.fontWeight,o.style.fontSize=t.fontSize,o.style.textTransform=t.textTransform,(i=document.createElement("div")).classList.add("t-menusub__menu--fullscreen__nav-arrow"),i.innerHTML='<svg class="tmain-submenu__close-icon" width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg">\n        <path d="M10.4142136,5 L11.8284271,6.41421356 L5.829,12.414 L23.4142136,12.4142136 L23.4142136,14.4142136 L5.829,14.414 L11.8284271,20.4142136 L10.4142136,21.8284271 L2,13.4142136 L10.4142136,5 Z" fill="'+n+'"></path>\n      </svg>',s.appendChild(i),s.appendChild(o),r.insertAdjacentElement("afterbegin",s),l&&l.insertAdjacentElement("beforeend",r))}),window.addEventListener("orientationchange",function(){setTimeout(function(){Array.prototype.forEach.call(document.querySelectorAll(".t-menusub__menu--fullscreen"),function(e){e.style.height=document.documentElement.clientHeight+"px"})},300)})}function t_menusub__createArrowCustomPos(e,t){e.classList.add("t-menusub__menu-custompos"),e.style.setProperty("--custom-pos",t+"px")}function t_menusub__getLeftRelativePos(e){var t=0;if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))n=e.getBoundingClientRect().left;else{for(var n=e.getClientRects().length?e.getBoundingClientRect().left:0,u=e.offsetParent;u&&1===u.nodeType&&"static"===window.getComputedStyle(u).getPropertyValue("position");)u=u.offsetParent;u&&u!==e&&1===u.nodeType&&(t=u.getClientRects().length?u.getBoundingClientRect().left:0)}return n-t}function t_menusub__hideSubmenu(e){var t=document.querySelector(".t-menusub__target-link_active");t&&(t.classList.remove("t-menusub__target-link_active"),t.setAttribute("aria-expanded","false")),e.style.display="",e.style.left="",e.style.top="",e.classList.remove("t-menusub__menu_show"),t_menusub__hideME401Submenu(e)}function t_menusub__appendArrow(e,t){var n;e.getAttribute("data-add-submenu-arrow")&&((n=document.createElement("div")).classList.add("t-menusub__arrow"),Array.prototype.forEach.call(t,function(e){e.insertAdjacentElement("beforeend",n)}))}function t_menusub__hightlight(){var e=window.location.href,t=window.location.pathname,e=(""===(t="/"===t.charAt(0)?t.slice(1):t)&&(t="/"),document.querySelectorAll('.t-menusub__list-item a[href="'+e+'"], .t-menusub__list-item a[href="'+e+'/"], .t-menusub__list-item a[href="'+t+'"], .t-menusub__list-item a[href="/'+t+'"], .t-menusub__list-item a[href="'+t+'/"], .t-menusub__list-item a[href="/'+t+'/"]'));Array.prototype.forEach.call(e,function(e){e.classList.add("t-active")})}function t_menusub__showME401Submenu(e){var t,n,e=e.closest(".t280"),u=e?e.querySelector(".t280__menu__wrapper"):null;u&&(n=t_menusub__isMobileME401(e),t=u.getAttribute("data-submenu-static"),u.classList.contains("t280__menu_static")&&u.setAttribute("data-submenu-static","n"),"n"===t&&n&&!u.classList.contains("t280__menu_static")&&(t=e.querySelector(".t280__menu"),n=e.querySelector(".t280__bottom"),t&&(t.style.transition="none"),n&&(n.style.transition="none"),u&&u.classList.add("t280__menu_static")))}function t_menusub__hideME401Submenu(e){var t,n,u,e=e.closest(".t280");e&&(t=t_menusub__isMobileME401(e),u=(n=e.querySelector(".t280__menu__wrapper"))?n.getAttribute("data-submenu-static"):"",e=e.querySelectorAll(".t280__menu .t-menusub__menu_show"),"n"===u&&window.t_menusub__isMobile&&t&&!e.length&&n.classList.contains("t280__menu_static")&&n.classList.remove("t280__menu_static"))}function t_menusub__isMobileME401(e){var t=e.querySelector(".t280__menu"),n=e.querySelector(".t280__bottom"),e=e.querySelector(".t280__container"),t=t?t.offsetHeight:0,n=n?n.offsetHeight:0,e=e?e.offsetHeight:0;return window.innerHeight-n-e-40<t}function t_menusub__checkAnchorLinks(e){var e=document.getElementById("rec"+e);!e||window.innerWidth<980||(e=e.querySelectorAll('a[href*="#"].t-menusub__link-item'),(e=Array.prototype.filter.call(e,function(e){return!e.classList.contains("tooltipstered")})).length&&t_menusub__catchScroll(e))}function t_menusub__catchScroll(u){u=Array.prototype.slice.call(u);var s=null,n=[],o={};(u=u.reverse()).forEach(function(e){var t=t_menusub__getSectionByHref(e);t&&t.id&&(n.push(t),o[t.id]=e)}),t_menusub__updateSectionsOffsets(n),n.sort(function(e,t){e=parseInt(e.getAttribute("data-offset-top"),10)||0;return(parseInt(t.getAttribute("data-offset-top"),10)||0)-e}),window.addEventListener("resize",t_throttle(function(){t_menusub__updateSectionsOffsets(n)},200)),t_menusub__highlightNavLinks(u,n,o,s),setTimeout(function(){t_menusub__updateSectionsOffsets(n),t_menusub__highlightNavLinks(u,n,o,s)},1e3),u.forEach(function(t,n){t.addEventListener("click",function(){var e=t_menusub__getSectionByHref(t);!t.classList.contains("tooltipstered")&&e&&e.id&&(u.forEach(function(e,t){t===n?e.classList.add("t-active"):e.classList.remove("t-active")}),s=e.id)})}),window.addEventListener("scroll",t_throttle(function(){s=t_menusub__highlightNavLinks(u,n,o,s)},100))}function t_menusub__getSectionByHref(e){var t,n;if(e)return n=e.getAttribute("href"),t=n?n.replace(/\s+/g,""):"",0===t.indexOf("/")&&(t=t.slice(1)),n&&e.matches('[href*="#rec"]')?(t=t.replace(/.*#/,""),document.getElementById(t)):(n='.r[data-record-type="215"] a[name="'+(e="number"==typeof(t=-1!==(e=n?n.trim():"").indexOf("#")&&e.indexOf("#"))||"number"==typeof(t=-1!==e.indexOf("/")&&e.indexOf("/"))?e.slice(t+1):e)+'"]',document.querySelector(n)?document.querySelector(n).closest(".r"):null)}function t_menusub__highlightNavLinks(e,t,n,u){var s=window.pageYOffset,o=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),i=u,r=t.length?t[t.length-1]:null,r=r?r.getAttribute("data-offset-top"):"0",r=parseInt(r,10)||0;if(t.length&&null===u&&s+300<r)return e.forEach(function(e){e.classList.remove("t-active")}),null;for(var l=0;l<t.length;l++){var c=t[l].getAttribute("data-offset-top"),a=t[l].id?n[t[l].id]:null;if(c<=s+300||0===l&&s>=o-window.innerHeight){null===u&&a&&!a.classList.contains("t-active")?(e.forEach(function(e){e.classList.remove("t-active")}),a&&a.classList.add("t-active"),i=null):null!==u&&t[l].id&&u===t[l].id&&(i=null);break}}return i}function t_menusub__updateSectionsOffsets(e){e.forEach(function(e){var t=e.getBoundingClientRect().top+window.pageYOffset;e.getAttribute("data-offset-top")!==t.toString()&&e.setAttribute("data-offset-top",t)})}function t_menusub__isBlockVisible(e){var t=window.innerWidth,n=e.getAttribute("data-screen-min"),e=e.getAttribute("data-screen-max");return!(n&&t<parseInt(n,10))&&!(e&&t>parseInt(e,10))}window.t_menusub__isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}return null});